package readwrite;

import java.sql.SQLException;
import java.util.ArrayList;

import org.apache.jasper.tagplugins.jstl.core.Catch;

import buildings.Buildings;
import buildings.House;
import buildings.LinkedHouse;
import buildings.School;
import buildings.Supermarket;
import buildings.TerrachedHouse;
import calculations.Moduls;

public class Tester {

	
	
	
	public static void main(String [] args) throws Exception
	{
		Connector connector = new Connector();
		
//		ArrayList<Kommuner> list = new ArrayList<Kommuner>();
//		
//		list = connector.KommunerList("1");
//		
//		for (int i = 0; i < list.size(); i++)
//			System.out.println(list.get(i).getKommuneId() + " " + list.get(i).getFylkeId() + list.get(i).getKommuneNavn());
//		
//		connector.RemoveHouseModul(1, 18);
		//System.out.println(connector.a);
		
		//connector.AddUserwithAccess("NewUUUuser","passOord", 1);
		//connector.ChangeUserName("NewNameuser", "NewNamuser");
		connector.ChangeUser("RandomnameKakeba", 1, 22);
		
		ArrayList<Moduls> moduls;
		ArrayList<House> modulHouses;
		ArrayList<Buildings> houses = new ArrayList<Buildings>();
		try {
			moduls = connector.getBigSimulationModuls(2);
			for(Moduls m: moduls)
			{
				modulHouses = connector.getHousesByModulID(m.getId());
				for(Buildings h: modulHouses)
				{
					houses.add(h);
				}
			}
				
			
			
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
